/* 添加到现有样式文件的顶部 */
.app-container {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 240px;
  background: #1f1f1f;
  padding: 24px 0;
  border-right: 1px solid #333;
}

.logo {
  padding: 0 24px;
  margin-bottom: 32px;
}

.logo h1 {
  color: #fff;
  font-size: 20px;
  margin: 0;
}

.nav-item {
  display: flex;
  align-items: center;
  padding: 12px 24px;
  color: #888;
  text-decoration: none;
  transition: all 0.2s;
  font-size: 16px;
}

.nav-icon {
  margin-right: 12px;
  font-size: 18px;
}

.nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.nav-item.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border-left: 3px solid #1890ff;
}

.main-content {
  flex: 1;
  background: #141414;
  padding: 32px;
  overflow-y: auto;
}

.page-header {
  margin-bottom: 24px;
}

.page-header h1 {
  font-size: 24px;
  color: #fff;
  margin: 0;
}

/* 基础布局 */
.container {
  padding: 32px;
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  gap: 32px;
}

/* 卡片基础样式 */
.env-item,
.claude-config,
.servers-section {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* 环境检查部分 */
.env-status {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.env-details {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.env-details p {
  margin: 0;
  color: #666;
  font-size: 14px;
}

/* Claude 配置部分 */
.config-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.config-item {
  background: #f8f8f8;
  padding: 16px;
  border-radius: 8px;
}

.config-item h3 {
  margin-bottom: 8px;
  font-size: 16px;
}

.config-item p {
  margin: 0;
  color: #666;
  font-size: 14px;
  word-break: break-all;
}

.installed-servers {
  margin-top: 24px;
}

.installed-servers h3 {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f0f0f0;
}

/* 服务器列表 */
.provider-item {
  background: #f8f8f8;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 16px;
}

.provider-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.provider-header h4 {
  margin: 0;
  font-size: 16px;
  color: #1a1a1a;
}

.provider-header .description {
  color: #666;
  font-size: 14px;
  margin-top: 4px;
}

.available-servers {
  margin-top: 16px;
}

/* 状态指示器 */
.server-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #666;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.status-dot.running {
  background-color: #52c41a;
  box-shadow: 0 0 0 4px rgba(82, 196, 26, 0.1);
}

.status-dot.stopped {
  background-color: #ff4d4f;
  box-shadow: 0 0 0 4px rgba(255, 77, 79, 0.1);
}

/* 按钮样式 */
button {
  padding: 8px 16px;
  border-radius: 6px;
  border: none;
  font-weight: 500;
  transition: all 0.2s;
  font-size: 14px;
  cursor: pointer;
}

.server-controls {
  display: flex;
  gap: 12px;
}

.install-button,
.control-button,
.select-button {
  background-color: #1890ff;
  color: white;
}

.install-button:hover,
.control-button:hover,
.select-button:hover {
  background-color: #096dd9;
}

.delete-button {
  background-color: #ff4d4f;
  color: white;
}

.delete-button:hover {
  background-color: #cf1322;
}

.refresh-button {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #1890ff;
  color: white;
  padding: 12px 24px;
  border-radius: 24px;
  box-shadow: 0 4px 12px rgba(24, 144, 255, 0.3);
  transition: all 0.2s;
}

.refresh-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(24, 144, 255, 0.4);
}

/* 输入框和表单 */
.path-selector {
  background: #f5f5f5;
  border-radius: 6px;
  padding: 16px;
  margin: 16px 0;
}

.path-input-group,
.env-input-group {
  display: flex;
  gap: 12px;
  margin: 8px 0;
  align-items: center;
}

input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  font-size: 14px;
}

.env-input-group label {
  min-width: 120px;
  font-size: 14px;
  color: #666;
}

/* 状态标签 */
.installed-badge {
  display: inline-block;
  padding: 4px 12px;
  background-color: #52c41a;
  color: white;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
}

.install-message {
  padding: 12px 16px;
  margin: 16px 0;
  border-radius: 8px;
  font-size: 14px;
}

.install-message.success {
  background-color: #e3fcef;
  color: #0a6245;
  border: 1px solid #d0f5e6;
}

.install-message.error {
  background-color: #ffe8e8;
  color: #cf1322;
  border: 1px solid #ffd1d1;
}

/* 暗色主题适配 */
@media (prefers-color-scheme: dark) {
  .env-item,
  .claude-config,
  .servers-section {
    background: #1f1f1f;
  }

  .provider-item,
  .config-item {
    background: #2f2f2f;
  }

  .path-selector {
    background: #2f2f2f;
  }

  input {
    background: #1f1f1f;
    border-color: #434343;
    color: #fff;
  }

  .provider-header h4,
  h2, h3 {
    color: #fff;
  }

  .installed-servers h3 {
    border-bottom-color: #333;
  }

  .install-message.success {
    background-color: #162312;
    color: #73d13d;
    border-color: #274916;
  }

  .install-message.error {
    background-color: #2a1215;
    color: #ff7875;
    border-color: #431418;
  }

  .refresh-button {
    background: #177ddc;
  }

  .refresh-button:hover {
    background: #1668dc;
  }
}

/* 响应式布局 */
@media (max-width: 768px) {
  .container {
    padding: 16px;
    gap: 16px;
  }

  .env-item,
  .claude-config,
  .servers-section {
    padding: 16px;
  }

  .server-controls {
    flex-wrap: wrap;
  }

  .refresh-button {
    bottom: 16px;
    right: 16px;
    padding: 10px 20px;
  }
}

.servers-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}